/*
 * XML Type:  XRickTextBox
 * Namespace: http://www.seedwill.com/xul/widget/
 * Java type: com.seedwill.xul.widget.XRickTextBox
 *
 * Automatically generated - do not modify.
 */
package com.seedwill.xul.widget.impl;
/**
 * An XML XRickTextBox(@http://www.seedwill.com/xul/widget/).
 *
 * This is a complex type.
 */
public class XRickTextBoxImpl extends com.seedwill.xul.widget.impl.XInputImpl implements com.seedwill.xul.widget.XRickTextBox
{
    private static final long serialVersionUID = 1L;
    
    public XRickTextBoxImpl(org.apache.xmlbeans.SchemaType sType)
    {
        super(sType);
    }
    
    private static final javax.xml.namespace.QName FILE$0 = 
        new javax.xml.namespace.QName("", "file");
    private static final javax.xml.namespace.QName TEXT$2 = 
        new javax.xml.namespace.QName("", "text");
    private static final javax.xml.namespace.QName FONT$4 = 
        new javax.xml.namespace.QName("", "font");
    private static final javax.xml.namespace.QName WRAP$6 = 
        new javax.xml.namespace.QName("", "wrap");
    
    
    /**
     * Gets the "file" element
     */
    public java.lang.String getFile()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FILE$0, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "file" element
     */
    public org.apache.xmlbeans.XmlString xgetFile()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(FILE$0, 0);
            return target;
        }
    }
    
    /**
     * True if has "file" element
     */
    public boolean isSetFile()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(FILE$0) != 0;
        }
    }
    
    /**
     * Sets the "file" element
     */
    public void setFile(java.lang.String file)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(FILE$0, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(FILE$0);
            }
            target.setStringValue(file);
        }
    }
    
    /**
     * Sets (as xml) the "file" element
     */
    public void xsetFile(org.apache.xmlbeans.XmlString file)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(FILE$0, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(FILE$0);
            }
            target.set(file);
        }
    }
    
    /**
     * Unsets the "file" element
     */
    public void unsetFile()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(FILE$0, 0);
        }
    }
    
    /**
     * Gets the "text" element
     */
    public java.lang.String getText()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(TEXT$2, 0);
            if (target == null)
            {
                return null;
            }
            return target.getStringValue();
        }
    }
    
    /**
     * Gets (as xml) the "text" element
     */
    public org.apache.xmlbeans.XmlString xgetText()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(TEXT$2, 0);
            return target;
        }
    }
    
    /**
     * True if has "text" element
     */
    public boolean isSetText()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(TEXT$2) != 0;
        }
    }
    
    /**
     * Sets the "text" element
     */
    public void setText(java.lang.String text)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(TEXT$2, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(TEXT$2);
            }
            target.setStringValue(text);
        }
    }
    
    /**
     * Sets (as xml) the "text" element
     */
    public void xsetText(org.apache.xmlbeans.XmlString text)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlString target = null;
            target = (org.apache.xmlbeans.XmlString)get_store().find_element_user(TEXT$2, 0);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlString)get_store().add_element_user(TEXT$2);
            }
            target.set(text);
        }
    }
    
    /**
     * Unsets the "text" element
     */
    public void unsetText()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(TEXT$2, 0);
        }
    }
    
    /**
     * Gets the "font" element
     */
    public com.seedwill.xul.widget.XFont getFont()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.seedwill.xul.widget.XFont target = null;
            target = (com.seedwill.xul.widget.XFont)get_store().find_element_user(FONT$4, 0);
            if (target == null)
            {
                return null;
            }
            return target;
        }
    }
    
    /**
     * True if has "font" element
     */
    public boolean isSetFont()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().count_elements(FONT$4) != 0;
        }
    }
    
    /**
     * Sets the "font" element
     */
    public void setFont(com.seedwill.xul.widget.XFont font)
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.seedwill.xul.widget.XFont target = null;
            target = (com.seedwill.xul.widget.XFont)get_store().find_element_user(FONT$4, 0);
            if (target == null)
            {
                target = (com.seedwill.xul.widget.XFont)get_store().add_element_user(FONT$4);
            }
            target.set(font);
        }
    }
    
    /**
     * Appends and returns a new empty "font" element
     */
    public com.seedwill.xul.widget.XFont addNewFont()
    {
        synchronized (monitor())
        {
            check_orphaned();
            com.seedwill.xul.widget.XFont target = null;
            target = (com.seedwill.xul.widget.XFont)get_store().add_element_user(FONT$4);
            return target;
        }
    }
    
    /**
     * Unsets the "font" element
     */
    public void unsetFont()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_element(FONT$4, 0);
        }
    }
    
    /**
     * Gets the "wrap" attribute
     */
    public boolean getWrap()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(WRAP$6);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_default_attribute_value(WRAP$6);
            }
            if (target == null)
            {
                return false;
            }
            return target.getBooleanValue();
        }
    }
    
    /**
     * Gets (as xml) the "wrap" attribute
     */
    public org.apache.xmlbeans.XmlBoolean xgetWrap()
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlBoolean target = null;
            target = (org.apache.xmlbeans.XmlBoolean)get_store().find_attribute_user(WRAP$6);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlBoolean)get_default_attribute_value(WRAP$6);
            }
            return target;
        }
    }
    
    /**
     * True if has "wrap" attribute
     */
    public boolean isSetWrap()
    {
        synchronized (monitor())
        {
            check_orphaned();
            return get_store().find_attribute_user(WRAP$6) != null;
        }
    }
    
    /**
     * Sets the "wrap" attribute
     */
    public void setWrap(boolean wrap)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.SimpleValue target = null;
            target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(WRAP$6);
            if (target == null)
            {
                target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(WRAP$6);
            }
            target.setBooleanValue(wrap);
        }
    }
    
    /**
     * Sets (as xml) the "wrap" attribute
     */
    public void xsetWrap(org.apache.xmlbeans.XmlBoolean wrap)
    {
        synchronized (monitor())
        {
            check_orphaned();
            org.apache.xmlbeans.XmlBoolean target = null;
            target = (org.apache.xmlbeans.XmlBoolean)get_store().find_attribute_user(WRAP$6);
            if (target == null)
            {
                target = (org.apache.xmlbeans.XmlBoolean)get_store().add_attribute_user(WRAP$6);
            }
            target.set(wrap);
        }
    }
    
    /**
     * Unsets the "wrap" attribute
     */
    public void unsetWrap()
    {
        synchronized (monitor())
        {
            check_orphaned();
            get_store().remove_attribute(WRAP$6);
        }
    }
}
